﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IDE_week2_Forms_project
{
    public partial class Form1 : Form
    {
        private void ChangeLanguage(string ro)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(ro));
            }
        }
        Boolean language;
        public Icon a { get
            { return this.Icon; }
            set {this.Icon =a ;}
        }
        public Form1()
        {
            language = false;
            InitializeComponent();
           
            a = this.Icon;
            
            
        }

        private void button3_Click(object sender, EventArgs e)
        {
            
           
            if (language == true)
            {

                this.ChangeLanguage("en");
                    language = false;
            }
            else { this.ChangeLanguage("ro"); language = true; }

        }

        private void button2_Click(object sender, EventArgs e)
        {
            
                            this.Icon=null ;
  
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.Icon1;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2();
            f2.Show();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void btnChange_Click(object sender, EventArgs e)
        {

        }
         
     
    }
}
